package wiki.zimo.certificate_manage.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;
/**
 *
 * @author 子墨
 * @date 2018/10/9 17:03
 * @describe 学生信息实体类
 */
@Entity
public class Student {
    @Excel(name = "id" ,orderNum = "0")
    private String id;
    @Excel(name = "学号" ,orderNum = "1")
    private String stuNum;
    @Excel(name = "学生姓名" ,orderNum = "2")
    private String stuName;
    @Excel(name = "学生班级" ,orderNum = "3")
    private String stuClass;
    @Excel(name = "所学专业" ,orderNum = "4")
    private String stuMajor;
    @Excel(name = "所属二级学院" ,orderNum = "5")
    private String stuSchool;
    @Excel(name = "联系电话" ,orderNum = "6")
    private String stuTellphone;
    @Excel(name = "联系邮箱" ,orderNum = "7")
    private String stuEmail;
    private String stuPassword;
    private String teacherId;

    @Basic
    @Column(name = "teacher_id")
    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public Student() {
    }

    @Id
    @Column(name = "Id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "stu_num")
    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    @Basic
    @Column(name = "stu_name")
    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    @Basic
    @Column(name = "stu_class")
    public String getStuClass() {
        return stuClass;
    }

    public void setStuClass(String stuClass) {
        this.stuClass = stuClass;
    }

    @Basic
    @Column(name = "stu_major")
    public String getStuMajor() {
        return stuMajor;
    }

    public void setStuMajor(String stuMajor) {
        this.stuMajor = stuMajor;
    }

    @Basic
    @Column(name = "stu_school")
    public String getStuSchool() {
        return stuSchool;
    }

    public void setStuSchool(String stuSchool) {
        this.stuSchool = stuSchool;
    }

    @Basic
    @Column(name = "stu_tellphone")
    public String getStuTellphone() {
        return stuTellphone;
    }

    public void setStuTellphone(String stuTellphone) {
        this.stuTellphone = stuTellphone;
    }

    @Basic
    @Column(name = "stu_email")
    public String getStuEmail() {
        return stuEmail;
    }

    public void setStuEmail(String stuEmail) {
        this.stuEmail = stuEmail;
    }

    @Basic
    @Column(name = "stu_password")
    public String getStuPassword() {
        return stuPassword;
    }

    public void setStuPassword(String stuPassword) {
        this.stuPassword = stuPassword;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id) &&
                Objects.equals(stuNum, student.stuNum) &&
                Objects.equals(stuName, student.stuName) &&
                Objects.equals(stuClass, student.stuClass) &&
                Objects.equals(stuMajor, student.stuMajor) &&
                Objects.equals(stuSchool, student.stuSchool) &&
                Objects.equals(stuTellphone, student.stuTellphone) &&
                Objects.equals(stuEmail, student.stuEmail) &&
                Objects.equals(stuPassword, student.stuPassword) &&
                Objects.equals(teacherId, student.teacherId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, stuNum, stuName, stuClass, stuMajor, stuSchool, stuTellphone, stuEmail, stuPassword, teacherId);
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", stuNum='" + stuNum + '\'' +
                ", stuName='" + stuName + '\'' +
                ", stuClass='" + stuClass + '\'' +
                ", stuMajor='" + stuMajor + '\'' +
                ", stuSchool='" + stuSchool + '\'' +
                ", stuTellphone='" + stuTellphone + '\'' +
                ", stuEmail='" + stuEmail + '\'' +
                ", stuPassword='" + stuPassword + '\'' +
                ", teacherId='" + teacherId + '\'' +
                '}';
    }
}
